package com.study_online.mapper;

import com.study_online.domain.ForumFatherPost;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 张天霸
 */

@Repository
public interface ForumFatherPostMapper extends MyBaseMapper<ForumFatherPost>{

    @Select("select * from forum_fatherpost")
    List<ForumFatherPost> findAllForum();

    @Select("select * from forum_fatherpost where post_type_id=#{postTypeId}")
    List<ForumFatherPost> findForumByPostTypeId(@Param("postTypeId") int postTypeId);

}
